package com.pty.demo.behaviour.visitor;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author pengty
 * @date 2020/3/16
 */
public class AnnualReportObjectStructure {

    private List<Element> elementList = Lists.newLinkedList();

    public void addElement(Element element) {
        elementList.add(element);
    }

    public void showAnnualReport(Visitor visitor) {
        elementList.forEach(e -> e.accept(visitor));
    }
}
